const {
  DBKEY
} = require('../config');
const {
  hello
} = require('../newservice/hello');
const {
  Db
} = require('./db')
const log = require('./log')
var db = new Db();
exports.db = db


exports.extractKeys = function extractKeys(data, keys, cb) {
  return data.map(element => {
    var map = {};
    keys.forEach(key => {
      map[key] = element[key];
    })
    cb && cb(map);
    return map
  });
}